package com.sp.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.sp.model.entity.Permission;
import com.sp.model.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 具体权限 Mapper
 *
 * @author tong
 * @date 2024/4/14 14:01
 */
@Mapper
public interface PermissionMapper extends BaseMapper<Permission> {

    /**
     * 查询所有具体权限
     *
     * @return
     */
    List<Permission> selectAll();

    /**
     * 分页条件查询
     *
     * @param page
     * @param queryWrapper
     * @return
     */
    IPage<Permission> page(IPage<User> page, @Param(Constants.WRAPPER) QueryWrapper<Permission> queryWrapper);

}
